﻿using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic;

namespace Arch.Common.Linq.Dynamic
{
    public static class EnumerableExtentions
    {
        public static IEnumerable<T> OrderBy<T>(this IEnumerable<T> source, string ordering, params object[] values)
        {
            return (IEnumerable<T>)DynamicQueryable.OrderBy((IQueryable<T>)source.AsQueryable(), ordering, values);
        }
    }
}
